﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LayersDotNet.DataAccess.Interface;
using LayersDotNet.DataAccess;
using LayersDotNet.DataAccess.EntityFx;
using LayersDotNet.BusinessLogic;
using System.Web;

namespace Common.InstanceManager
{
    public class WinApp
    {
        static WinApp()
        {
            DataAccess = GetNewDataAccess();
            BusinessLogic = GetNewBusinessLogic(DataAccess);
        }

        public static IDataAccessAccessPoint DataAccess
        {
            get;
            set;
        }

        public static IBusinessLogicAccessPoint BusinessLogic
        {
            get;
            set;
        }

        public static IDataAccessAccessPoint GetNewDataAccess()
        {
            return new EFInstanceProvider();
        }

        public static IBusinessLogicAccessPoint GetNewBusinessLogic(IDataAccessAccessPoint dataAccess)
        {
            return new BusinessLogicAccessPoint(dataAccess);
        }
    }
}
